package com.fary.resource;

import org.springframework.core.io.ByteArrayResource;

import java.io.IOException;

public class TestByteArrayResource {

	/**
	 * 针对于字节数组封装的Resource，用来从字节数组获取资源内容
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {
		ByteArrayResource resource = new ByteArrayResource("Hello".getBytes());
		//ByteArrayInputStream()
		PrintResource.printContent(resource.getInputStream());
	}
}
